Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改access token自动刷新逻辑,避免循环递归调用 #2115

Merged
merged 4 commits into from
May 20, 2021

Conversation

hywr
Copy link

@hywr hywr commented May 17, 2021

No description provided.

@taneg
Copy link

taneg commented May 17, 2021

获取token报错不会进到重试

@hywr
Copy link
Author

hywr commented May 18, 2021

获取token报错不会进到重试

比如像 WxMaCodeService.getQrCode 这个方法,他要求第三方平台才可以调用,如果使用的是secrete获得的access token调用接口会报access token错误, 原先逻辑重新刷新 access toke再调用然后继续报access token错误,然后再刷新access token,一直循环...

@taneg
Copy link

taneg commented May 18, 2021

第三方平台获取token,是不会拿开放平台的secret去获取的,都是封装了的
image
image

@hywr
Copy link
Author

hywr commented May 18, 2021

第三方平台获取token,是不会拿开放平台的secret去获取的,都是封装了的
image
image

不可否认正常情况下能够正常工作,但如果使用小程序appId 和 secrete 去掉用第三方平台的接口,就会出现循环互递归

@binarywang binarywang merged commit 62a3931 into binarywang:develop May 20, 2021
@binarywang binarywang added this to the 4.1.0 milestone May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants